
  <div class="table-contain" (paste)="paste($event)" >
    <!-- 要使用固定列，就要让非固定列宽度之后不超过width ,  所以需要限制非固定列的宽度，不能任其膨胀 -->
    <nz-table #basicTable [nzData]="listOfData">
        <thead>
          <tr>
            <ng-container *ngFor="let col of cols">
              <th
                *ngIf="col.width"
                nz-resizable
                nzBounds="window"
                [nzPreview]="false"
                [nzWidth]="col.width"
                [nzMaxWidth]="256"
                [nzMinWidth]="60"
                 (nzResize)="onResize($event, col.title)" 
              >
                {{ col.title }}
                <!--仅仅是箭头显示的方向,left right 都是水平 只不过left 是反着的 左拖缩小右拖放大 
                如果不想限制只能水平或者垂直，可以写 <nz-resize-handles >
                -->
                <nz-resize-handle nzDirection="left">
                  <div class="resize-trigger"></div>
                </nz-resize-handle>
              </th>
              <th *ngIf="!col.width">
                {{ col.title }}
              </th>
            </ng-container>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of basicTable.data">
            <td>{{ data.name }}</td>
            <td>{{ data.age }}</td>
            <td>{{ data.address }}</td>
            <td>-</td>
          </tr>
        </tbody>
      </nz-table>

      <div style="float: right;" nz-resizable  class="resize" [style.height.px]="height" [style.width.px]="width"  (nzResize)="onResize1($event)">
        
        <!-- <nz-resize-handles >
          </nz-resize-handles> -->
          <nz-resize-handles [nzDirections]="['left']"></nz-resize-handles>
      </div>

      <button (click)="creatXlsx()">xlsx</button>
      
  </div>